package com.mytijian.mashang.job;

import com.dangdang.ddframe.job.api.ShardingContext;
import com.dangdang.ddframe.job.api.simple.SimpleJob;
import com.mytijian.code.service.ConsumeCodeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * 核销过程出现网络超时等异常后,通过此定时任务进行重新核销回调
 * Created by shjh on 2017/9/27.
 */
public class ReconsumeJob implements SimpleJob {
    private Logger logger = LoggerFactory.getLogger(ReconsumeJob.class);

    @Autowired
    private ConsumeCodeService consumeCodeService;

    @Override
    public void execute(ShardingContext shardingContext) {
        logger.info("重新核销回调任务开始");
        try {
        	
        	// TODO 不要提交
//            consumeCodeService.reConsume();
        }catch (Exception ex) {
            logger.warn("重新核销回调任务执行失败：", ex);
        }
        logger.info("重新核销回调任务结束");
    }
}
